import React from 'react';
import {Router,Route,NavLink,Switch,Redirect} from 'dva/router';
import App from '../App'
import Login from '../pages/login/login'
import Register from '../pages/register/register'
import bossinfo from '../pages/bossinfo/bossinfo'
import geniusinfo from '../pages/geniusinfo/geniusinfo'
import List from '../pages/list/list'
import Chat from '../pages/chat/chat'
let fn = function({history,app}){
    return(
        <Router history={history}>
            <React.Fragment>
                <Switch>
                    <Route path='/' exact component={App}></Route>
                    <Route path='/login' exact exact component={Login} ></Route>
                    <Route path='/register' exact component={Register}></Route>
                    <Route path='/bossinfo' exact component={bossinfo}></Route>
                    <Route path='/geniusinfo' exact component={geniusinfo}></Route>
                    <Route path='/chat/:user' exact component={Chat}></Route>
                    {/* <Redirect to='/login'></Redirect> */}
                    {/* <Redirect path=''></Redirect> */}
                    <Route component={List}></Route>
                </Switch>
            </React.Fragment>
        </Router>
    )
}
export default fn;